Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two small breaking API changes before next release #516

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cpu
Copy link
Member

@cpu cpu commented Dec 24, 2024

Knocking out a couple small issues labelled next-major-release since we're preparing a 0.15 in main. Sure do appreciate having let .. else stable in our MSRV 💞

Resolves #179
Resolves #229

server: SNI rustls_connection getter ret rustls_str

The rustls_server_connection_get_server_name() API function previously wrote the SNI value to a caller-provided buffer as it predates the rustls_str pattern.

This commit updates it to return a rustls_str. Invalid parameters or incomplete connection state are returned as empty strs.

The documented lifetime matches that of other rustls_connection accessors based on a "set-once" property we assume from upstream.

server: remove rustls_result from set_persistence

Previously rustls_server_config_builder_set_persistence() returned a rustls_result just to indicate if a required parameter was NULL.

Our API guidelines instead recommend this function do nothing and return void for these circumstances.

cpu added 2 commits December 23, 2024 15:14
The `rustls_server_connection_get_server_name()` API function previously
wrote the SNI value to a caller-provided buffer as it predates the
`rustls_str` pattern.

This commit updates it to return a `rustls_str`. Invalid parameters or
incomplete connection state are returned as empty strs.

The documented lifetime matches that of other `rustls_connection`
accessors based on a "set-once" property we assume from upstream.
Previously `rustls_server_config_builder_set_persistence()` returned
a `rustls_result` just to indicate if a required parameter was `NULL`.

Our API guidelines instead recommend this function do nothing and return
void for these circumstances.
@cpu cpu self-assigned this Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant